#!/bin/sh

usage(){
	echo "usage : $0 isoSourcePath isoOutput"
	exit 1
}

isoSourcePath=$1
isoOutput=$2

if [ $#  -ne 2 ]
then 
	usage
fi

#mise a jour des md5
find ${isoSourcePath} -type f -print0 | xargs -0 md5sum | grep -v "\${isoSourcePath}/md5sum.txt" > ${isoSourcePath}/md5sum.txt

# generation de l'iso
genisoimage -o ${isoOutput} -V di`date -u +%m%d%H%M%S` -r -J -no-emul-boot -boot-load-size 4 -boot-info-table -b isolinux.bin -c boot.cat ${isoSourcePath}
